package com.honey.solr.schema.node;

import com.honey.compilation.xml.XmlElement;
import com.honey.solr.SolrFactory;
import com.honey.solr.schema.SchemaNode;

public class UniqueKey implements SchemaNode {
	
	private SolrFactory solrFactory;
	
	public UniqueKey(SolrFactory solrFactory){
		
		this.solrFactory = solrFactory;
	}
	
	@Override
	public void appendChildNode(XmlElement root){
		XmlElement answer = new XmlElement(root,"uniqueKey");
		
		answer.addTextElement(solrFactory.getUniqueKey());
		answer.addXmlDoc("文档的唯一标识，必须填写这个field");
	}
	
}
